package org.fireflow2.designer.eclipse.policies.connection;

import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.ComponentEditPolicy;
import org.eclipse.gef.requests.GroupRequest;
import org.fireflow2.designer.eclipse.commands.connection.DeleteTransitionCommand;
import org.fireflow2.designer.eclipse.modelwrapper.NodeWrapper;
import org.fireflow2.designer.eclipse.modelwrapper.basic.TransitionWrapper;

public class TransitionEditPolicy extends ComponentEditPolicy {
    protected Command createDeleteCommand(GroupRequest deleteRequest) {
        TransitionWrapper transitionWrapper=(TransitionWrapper)getHost().getModel();
        DeleteTransitionCommand cmd=new DeleteTransitionCommand();
        cmd.setSubProcessWrapper(transitionWrapper.getSubProcessWrapper());
        cmd.setTransitionWrapper(transitionWrapper);
        return cmd;
    }
}
